package com.jiankang.askhealth.core.email.domain;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class EmailExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    protected int limitStart = -1;

    protected int limitMaxSize = -1;

    public EmailExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setLimitStart(int limitStart) {
        this.limitStart=limitStart;
    }

    public int getLimitStart() {
        return limitStart;
    }

    public void setLimitMaxSize(int limitMaxSize) {
        this.limitMaxSize=limitMaxSize;
    }

    public int getLimitMaxSize() {
        return limitMaxSize;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Integer value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Integer value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Integer value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Integer value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Integer value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Integer> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Integer> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Integer value1, Integer value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Integer value1, Integer value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andSubjectIsNull() {
            addCriterion("subject is null");
            return (Criteria) this;
        }

        public Criteria andSubjectIsNotNull() {
            addCriterion("subject is not null");
            return (Criteria) this;
        }

        public Criteria andSubjectEqualTo(String value) {
            addCriterion("subject =", value, "subject");
            return (Criteria) this;
        }

        public Criteria andSubjectNotEqualTo(String value) {
            addCriterion("subject <>", value, "subject");
            return (Criteria) this;
        }

        public Criteria andSubjectGreaterThan(String value) {
            addCriterion("subject >", value, "subject");
            return (Criteria) this;
        }

        public Criteria andSubjectGreaterThanOrEqualTo(String value) {
            addCriterion("subject >=", value, "subject");
            return (Criteria) this;
        }

        public Criteria andSubjectLessThan(String value) {
            addCriterion("subject <", value, "subject");
            return (Criteria) this;
        }

        public Criteria andSubjectLessThanOrEqualTo(String value) {
            addCriterion("subject <=", value, "subject");
            return (Criteria) this;
        }

        public Criteria andSubjectLike(String value) {
            addCriterion("subject like", value, "subject");
            return (Criteria) this;
        }

        public Criteria andSubjectNotLike(String value) {
            addCriterion("subject not like", value, "subject");
            return (Criteria) this;
        }

        public Criteria andSubjectIn(List<String> values) {
            addCriterion("subject in", values, "subject");
            return (Criteria) this;
        }

        public Criteria andSubjectNotIn(List<String> values) {
            addCriterion("subject not in", values, "subject");
            return (Criteria) this;
        }

        public Criteria andSubjectBetween(String value1, String value2) {
            addCriterion("subject between", value1, value2, "subject");
            return (Criteria) this;
        }

        public Criteria andSubjectNotBetween(String value1, String value2) {
            addCriterion("subject not between", value1, value2, "subject");
            return (Criteria) this;
        }

        public Criteria andSendtoIsNull() {
            addCriterion("sendto is null");
            return (Criteria) this;
        }

        public Criteria andSendtoIsNotNull() {
            addCriterion("sendto is not null");
            return (Criteria) this;
        }

        public Criteria andSendtoEqualTo(String value) {
            addCriterion("sendto =", value, "sendto");
            return (Criteria) this;
        }

        public Criteria andSendtoNotEqualTo(String value) {
            addCriterion("sendto <>", value, "sendto");
            return (Criteria) this;
        }

        public Criteria andSendtoGreaterThan(String value) {
            addCriterion("sendto >", value, "sendto");
            return (Criteria) this;
        }

        public Criteria andSendtoGreaterThanOrEqualTo(String value) {
            addCriterion("sendto >=", value, "sendto");
            return (Criteria) this;
        }

        public Criteria andSendtoLessThan(String value) {
            addCriterion("sendto <", value, "sendto");
            return (Criteria) this;
        }

        public Criteria andSendtoLessThanOrEqualTo(String value) {
            addCriterion("sendto <=", value, "sendto");
            return (Criteria) this;
        }

        public Criteria andSendtoLike(String value) {
            addCriterion("sendto like", value, "sendto");
            return (Criteria) this;
        }

        public Criteria andSendtoNotLike(String value) {
            addCriterion("sendto not like", value, "sendto");
            return (Criteria) this;
        }

        public Criteria andSendtoIn(List<String> values) {
            addCriterion("sendto in", values, "sendto");
            return (Criteria) this;
        }

        public Criteria andSendtoNotIn(List<String> values) {
            addCriterion("sendto not in", values, "sendto");
            return (Criteria) this;
        }

        public Criteria andSendtoBetween(String value1, String value2) {
            addCriterion("sendto between", value1, value2, "sendto");
            return (Criteria) this;
        }

        public Criteria andSendtoNotBetween(String value1, String value2) {
            addCriterion("sendto not between", value1, value2, "sendto");
            return (Criteria) this;
        }

        public Criteria andSendDatetimeIsNull() {
            addCriterion("send_datetime is null");
            return (Criteria) this;
        }

        public Criteria andSendDatetimeIsNotNull() {
            addCriterion("send_datetime is not null");
            return (Criteria) this;
        }

        public Criteria andSendDatetimeEqualTo(Date value) {
            addCriterion("send_datetime =", value, "sendDatetime");
            return (Criteria) this;
        }

        public Criteria andSendDatetimeNotEqualTo(Date value) {
            addCriterion("send_datetime <>", value, "sendDatetime");
            return (Criteria) this;
        }

        public Criteria andSendDatetimeGreaterThan(Date value) {
            addCriterion("send_datetime >", value, "sendDatetime");
            return (Criteria) this;
        }

        public Criteria andSendDatetimeGreaterThanOrEqualTo(Date value) {
            addCriterion("send_datetime >=", value, "sendDatetime");
            return (Criteria) this;
        }

        public Criteria andSendDatetimeLessThan(Date value) {
            addCriterion("send_datetime <", value, "sendDatetime");
            return (Criteria) this;
        }

        public Criteria andSendDatetimeLessThanOrEqualTo(Date value) {
            addCriterion("send_datetime <=", value, "sendDatetime");
            return (Criteria) this;
        }

        public Criteria andSendDatetimeIn(List<Date> values) {
            addCriterion("send_datetime in", values, "sendDatetime");
            return (Criteria) this;
        }

        public Criteria andSendDatetimeNotIn(List<Date> values) {
            addCriterion("send_datetime not in", values, "sendDatetime");
            return (Criteria) this;
        }

        public Criteria andSendDatetimeBetween(Date value1, Date value2) {
            addCriterion("send_datetime between", value1, value2, "sendDatetime");
            return (Criteria) this;
        }

        public Criteria andSendDatetimeNotBetween(Date value1, Date value2) {
            addCriterion("send_datetime not between", value1, value2, "sendDatetime");
            return (Criteria) this;
        }

        public Criteria andSendfromIsNull() {
            addCriterion("sendfrom is null");
            return (Criteria) this;
        }

        public Criteria andSendfromIsNotNull() {
            addCriterion("sendfrom is not null");
            return (Criteria) this;
        }

        public Criteria andSendfromEqualTo(String value) {
            addCriterion("sendfrom =", value, "sendfrom");
            return (Criteria) this;
        }

        public Criteria andSendfromNotEqualTo(String value) {
            addCriterion("sendfrom <>", value, "sendfrom");
            return (Criteria) this;
        }

        public Criteria andSendfromGreaterThan(String value) {
            addCriterion("sendfrom >", value, "sendfrom");
            return (Criteria) this;
        }

        public Criteria andSendfromGreaterThanOrEqualTo(String value) {
            addCriterion("sendfrom >=", value, "sendfrom");
            return (Criteria) this;
        }

        public Criteria andSendfromLessThan(String value) {
            addCriterion("sendfrom <", value, "sendfrom");
            return (Criteria) this;
        }

        public Criteria andSendfromLessThanOrEqualTo(String value) {
            addCriterion("sendfrom <=", value, "sendfrom");
            return (Criteria) this;
        }

        public Criteria andSendfromLike(String value) {
            addCriterion("sendfrom like", value, "sendfrom");
            return (Criteria) this;
        }

        public Criteria andSendfromNotLike(String value) {
            addCriterion("sendfrom not like", value, "sendfrom");
            return (Criteria) this;
        }

        public Criteria andSendfromIn(List<String> values) {
            addCriterion("sendfrom in", values, "sendfrom");
            return (Criteria) this;
        }

        public Criteria andSendfromNotIn(List<String> values) {
            addCriterion("sendfrom not in", values, "sendfrom");
            return (Criteria) this;
        }

        public Criteria andSendfromBetween(String value1, String value2) {
            addCriterion("sendfrom between", value1, value2, "sendfrom");
            return (Criteria) this;
        }

        public Criteria andSendfromNotBetween(String value1, String value2) {
            addCriterion("sendfrom not between", value1, value2, "sendfrom");
            return (Criteria) this;
        }

        public Criteria andStatusIsNull() {
            addCriterion("status is null");
            return (Criteria) this;
        }

        public Criteria andStatusIsNotNull() {
            addCriterion("status is not null");
            return (Criteria) this;
        }

        public Criteria andStatusEqualTo(Integer value) {
            addCriterion("status =", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotEqualTo(Integer value) {
            addCriterion("status <>", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThan(Integer value) {
            addCriterion("status >", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("status >=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThan(Integer value) {
            addCriterion("status <", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThanOrEqualTo(Integer value) {
            addCriterion("status <=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusIn(List<Integer> values) {
            addCriterion("status in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotIn(List<Integer> values) {
            addCriterion("status not in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusBetween(Integer value1, Integer value2) {
            addCriterion("status between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("status not between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andCreateDatetimeIsNull() {
            addCriterion("create_datetime is null");
            return (Criteria) this;
        }

        public Criteria andCreateDatetimeIsNotNull() {
            addCriterion("create_datetime is not null");
            return (Criteria) this;
        }

        public Criteria andCreateDatetimeEqualTo(Date value) {
            addCriterion("create_datetime =", value, "createDatetime");
            return (Criteria) this;
        }

        public Criteria andCreateDatetimeNotEqualTo(Date value) {
            addCriterion("create_datetime <>", value, "createDatetime");
            return (Criteria) this;
        }

        public Criteria andCreateDatetimeGreaterThan(Date value) {
            addCriterion("create_datetime >", value, "createDatetime");
            return (Criteria) this;
        }

        public Criteria andCreateDatetimeGreaterThanOrEqualTo(Date value) {
            addCriterion("create_datetime >=", value, "createDatetime");
            return (Criteria) this;
        }

        public Criteria andCreateDatetimeLessThan(Date value) {
            addCriterion("create_datetime <", value, "createDatetime");
            return (Criteria) this;
        }

        public Criteria andCreateDatetimeLessThanOrEqualTo(Date value) {
            addCriterion("create_datetime <=", value, "createDatetime");
            return (Criteria) this;
        }

        public Criteria andCreateDatetimeIn(List<Date> values) {
            addCriterion("create_datetime in", values, "createDatetime");
            return (Criteria) this;
        }

        public Criteria andCreateDatetimeNotIn(List<Date> values) {
            addCriterion("create_datetime not in", values, "createDatetime");
            return (Criteria) this;
        }

        public Criteria andCreateDatetimeBetween(Date value1, Date value2) {
            addCriterion("create_datetime between", value1, value2, "createDatetime");
            return (Criteria) this;
        }

        public Criteria andCreateDatetimeNotBetween(Date value1, Date value2) {
            addCriterion("create_datetime not between", value1, value2, "createDatetime");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}